package com.gitee.aurora.engine.controller;

import com.gitee.aurora.core.utils.ResultVO;
import com.gitee.aurora.engine.service.SjzxCheckService;
import com.gitee.aurora.engine.vo.DataCheckVo;
import com.gitee.aurora.engine.vo.ResultCheckVo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * author: jiangfuxiao
 * Date:2022/9/2 9:28
 */
@Controller
@ResponseBody
@RequestMapping("stSjzxCheck")
public class SjzxCheckController {


    @Resource(name = "sjzxCheckServiceImpl")
    private SjzxCheckService sjzxCheckService;



    @PostMapping("/queryTableData")
    public ResultVO queryTableData(@RequestBody DataCheckVo vo ) {
        return  sjzxCheckService.queryTableData(vo);
    }


    @PostMapping("/insertData")
    public ResultVO insertData(@RequestBody DataCheckVo vo) {
        return  sjzxCheckService.insertData(vo);
    }

    @PostMapping("/syncData")
    public ResultVO syncData(@RequestBody ResultCheckVo vo) {
        return  sjzxCheckService.syncData(vo);
    }

    @PostMapping("getDBTableField")
    public ResultVO getDBTableField(@RequestBody String tableName){
        return sjzxCheckService.getDBTableField(tableName);
    }

}
